Skip to content

Iterative Execution#6753

Open
gatesn wants to merge 5 commits intodevelopfrom
ngates/execution-3
Open

Iterative Execution#6753
gatesn wants to merge 5 commits intodevelopfrom
ngates/execution-3

Conversation

@gatesn
Copy link
Contributor

@gatesn gatesn commented Mar 2, 2026

No description provided.

gatesn and others added 3 commits March 2, 2026 12:17
Adds a method to replace a single child of an array by index,
building on the existing with_children infrastructure. This is
needed by the upcoming iterative execution scheduler which replaces
children one at a time as they are executed.

Signed-off-by: Nicholas Gates <nick@nickgates.com>

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds the ExecutionStep enum (ExecuteChild, ColumnarizeChild, Done)
that encodings will return from VTable::execute instead of ArrayRef.
This is infrastructure for the upcoming iterative execution scheduler.

Signed-off-by: Nicholas Gates <nick@nickgates.com>

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…duler

Changes the VTable::execute signature to return ExecutionStep instead of
ArrayRef, and replaces the Executable for Columnar implementation with an
iterative work-stack scheduler.

The ExecutionStep enum has three variants:
- ExecuteChild(i): ask the scheduler to execute child i to columnar
- ColumnarizeChild(i): same but skip cross-step optimization
- Done(result): execution complete

The new scheduler in Executable for Columnar uses an explicit stack
instead of recursion, and runs reduce/reduce_parent rules between
steps via the existing optimizer infrastructure.

All encoding implementations are mechanically wrapped in
ExecutionStep::Done(...) to preserve existing behavior. Individual
encodings will be migrated to use ExecuteChild/ColumnarizeChild in
follow-up PRs.

Signed-off-by: Nicholas Gates <nick@nickgates.com>

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codspeed-hq
Copy link

codspeed-hq bot commented Mar 2, 2026

Merging this PR will degrade performance by 35.17%

⚡ 1 improved benchmark
❌ 26 regressed benchmarks
✅ 927 untouched benchmarks
⏩ 1466 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation chunked_opt_bool_canonical_into[(100, 100)] 733.7 µs 832.2 µs -11.84%
Simulation chunked_bool_canonical_into[(10, 1000)] 1.4 ms 1.8 ms -23.03%
Simulation chunked_opt_bool_into_canonical[(100, 100)] 765.1 µs 863.5 µs -11.39%
Simulation chunked_bool_canonical_into[(100, 100)] 167.6 µs 209.8 µs -20.11%
Simulation chunked_opt_bool_canonical_into[(10, 1000)] 1.5 ms 2.3 ms -35.17%
Simulation chunked_varbinview_into_canonical[(10, 1000)] 2.9 ms 3.4 ms -13.83%
Simulation chunked_opt_bool_into_canonical[(10, 1000)] 1.7 ms 2.5 ms -31.73%
Simulation chunked_varbinview_canonical_into[(10, 1000)] 2.7 ms 3.1 ms -14.93%
Simulation decompress_alp[f32, (1000, 0.01, 0.25)] 15.4 µs 19.1 µs -19.48%
Simulation decompress_alp[f64, (1000, 0.01, 0.95)] 17.9 µs 21.7 µs -17.53%
Simulation decompress_alp[f32, (1000, 0.01, 0.95)] 15.1 µs 18.8 µs -19.89%
Simulation decompress_alp[f64, (1000, 0.01, 1.0)] 17.7 µs 19.8 µs -10.64%
Simulation decompress_alp[f32, (1000, 0.0, 0.95)] 11.5 µs 14.7 µs -22.29%
Simulation decompress_alp[f64, (1000, 0.1, 0.25)] 18 µs 21.8 µs -17.4%
Simulation decompress_alp[f32, (1000, 0.0, 1.0)] 11.2 µs 12.7 µs -12.05%
Simulation decompress_alp[f64, (1000, 0.1, 0.95)] 19.9 µs 23.7 µs -16.07%
Simulation decompress_alp[f32, (1000, 0.01, 1.0)] 15 µs 17.1 µs -11.99%
Simulation decompress_alp[f32, (1000, 0.1, 1.0)] 16.1 µs 18.2 µs -11.29%
Simulation decompress_alp[f32, (1000, 0.1, 0.25)] 15.3 µs 19 µs -19.7%
Simulation decompress_alp[f32, (1000, 0.1, 0.95)] 16.9 µs 20.6 µs -18.01%
... ... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.


Comparing ngates/execution-3 (b5b1652) with develop (8e2beb5)

Open in CodSpeed

Footnotes

  1. 1466 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@gatesn gatesn added the changelog/feature A new feature label Mar 2, 2026
Copy link
Contributor Author

gatesn commented Mar 2, 2026

This stack of pull requests is managed by Graphite. Learn more about stacking.

Signed-off-by: Nicholas Gates <nick@nickgates.com>

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gatesn gatesn force-pushed the ngates/execution-3 branch 2 times, most recently from 5cd1e99 to 6c8dcdc Compare March 2, 2026 20:13
Move the iterative execution scheduler into a general-purpose
`execute_until<M: Matcher>` method on `dyn Array`. The scheduler
terminates when the root array matches `M`, while each child
can specify its own termination condition via a `DonePredicate`
carried in `ExecutionStep::ExecuteChild`.

`ExecutionStep` now provides constructor methods:
- `execute_child::<M>(idx)` — request child execution until M matches
- `done(result)` — signal completion

Both `Executable for Columnar` and `Executable for Canonical` are
simplified to thin wrappers over `execute_until` with `AnyColumnar`
and `AnyCanonical` matchers respectively.

Signed-off-by: Nick Gates <nick@vortex.dev>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gatesn gatesn force-pushed the ngates/execution-3 branch from 6c8dcdc to b5b1652 Compare March 2, 2026 20:43
@gatesn gatesn added the do not merge Pull requests that are not intended to merge label Mar 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/feature A new feature do not merge Pull requests that are not intended to merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant